feat(projects): auto-link a publication's talk/video/poster to its projects (#649)#1372
Merged
Merged
Conversation
…ojects (#649) A publication's child artifacts (the talk that presented it, the teaser video, the poster) are the same scholarly work, so they belong to the same projects. Adds propagate_publication_projects, which copies a publication's projects onto any of its children that currently have none. - Additive-only: never removes a link, never touches a child that already has projects (a deliberate different linkage is preserved). - Idempotent, so it's wired into docker-entrypoint.sh and self-heals on every container start. This clears the "parent publication is linked -- inherit its projects" rows in the Artifacts-not-linked-to-a-project data-health check, leaving only the artifacts that genuinely need a human decision. Tested in website/tests/test_propagate_publication_projects.py (inherit for talk/video, skip-already-linked, no-parent-projects no-op, dry-run, idempotency). Bumps version to 2.17.3. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #1370 (the unlinked-artifacts data-health check). You confirmed that in all cases the "parent publication is linked — inherit its projects" rows should inherit — which is correct by definition: a publication's talk/video/poster is the same scholarly artifact, so it belongs to the same projects. This automates exactly those cases.
What
New
propagate_publication_projectsmanagement command: for every publication that has projects, copy them onto any of itstalk/video/posterchildren that currently have none.docker-entrypoint.sh(step 4.9) alongsideauto_close_project_rolesetc., so it runs on every container start. The ~25 current inherit-eligible rows clear on the next deploy, and any future paper whose child is added without a project fixes itself.--dry-runto preview.This leaves the data-health check showing only the artifacts that genuinely need a human decision (no parent publication to inherit from) — the clean division of labor.
Scope (from the prod snapshot)
~23 videos + 2 talks are childless artifacts of an already-linked publication → auto-linked on next deploy.
Tests
website/tests/test_propagate_publication_projects.py(6 cases): talk/video inherit, skip-already-linked, no-op when parent has no projects, dry-run writes nothing, idempotency. All pass:python manage.py test website.tests.test_propagate_publication_projects --settings=makeabilitylab.settings_testBumps version to 2.17.3. Deferred Tier-2 (artifacts with no parent publication) remains documented in
docs/plans/issue-649-link-artifacts-to-projects.md.🤖 Generated with Claude Code